home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / gottlieb.c < prev    next >
C/C++ Source or Header  |  2000-05-19  |  72KB  |  1,856 lines

  1. /***************************************************************************
  2.  
  3. Gottlieb driver : dedicated to Warren Davis, Jeff Lee, Tim Skelly & David Thiel
  4.  
  5. driver by Fabrice Frances
  6.  
  7. Notes:
  8. There was a bug in the hardware of the GG1 and GG2 boards, which is not
  9. emulated. The bug seems to have disappeared with the later revision of the
  10. board, e.g the board used by 3Stooges and Mach3 don't seem to have it).
  11. The bug was affecting the first character column (on horizontal games):
  12. screen memory could be used, but whatever was stored in this column, always
  13. the same character was displayed.
  14. This led to two consequences:
  15. - the image on the monitor had to be stretched so that the column was not
  16.   visible
  17. - game designers were not using the first column. In fact, when the first
  18.   column was ejected from the screen, the last one was usually out too,
  19.   so it wasn't used either...
  20.  
  21. ****************************************************************************
  22.  
  23. Reactor: earlier version of the board, with a different memory map
  24.  
  25. Main processor (8088 minimum mode)
  26. 0000-1fff RAM (NOT battery backed unlike all the others)
  27. 2000-2fff sprites
  28. 3000-37ff video ram
  29. 4000-4fff char generator ram
  30. 6000-67ff palette ram (palette of 16 colors)
  31. 7000-77ff i/o ports
  32. 8000-ffff ROM
  33.  
  34. memory mapped ports:
  35.  
  36. read:
  37. 7000    Dip switch
  38. 7001    Inputs 10-17
  39. 7002    trackball H
  40. 7003    trackball V
  41. 7004    Inputs 40-47
  42.  
  43. write:
  44. 7000    watchdog reset
  45. 7001    trackball clear
  46. 7002    Outputs 20-27
  47. 7003    Flipflop outputs:
  48.         b0: F/B priority
  49.         b1: horiz. flip
  50.         b2: vert. flip
  51.         b3: Output 33
  52.         b4: coin counter
  53.         b5: left lamp (1P/3Lives start)
  54.         b6: middle lamps (2P/3Lives start, 1P/7Lives start)
  55.         b7: right lamp (2P/7Lives start)
  56. 7004    Outputs 40-47
  57.  
  58. interrupts:
  59. INTR not connected
  60. NMI connected to vertical blank
  61.  
  62.  
  63.  
  64. Gottlieb games memory map
  65.  
  66. Main processor (8088 minimum mode)
  67. 0000-0fff RAM (battery backed)
  68. 1000-1fff RAM or ROM (selected with jumpers on the board)
  69. 2000-2fff RAM or ROM (selected with jumpers on the board)
  70. 3000-37ff sprites. The manual says there are 63 sprites (NOT 64),
  71.           but the Q*Bert object priority test leaves sprite #63 dangling, so
  72.           they are probably only 62.
  73. 3800-3fff video RAM
  74. 4000-4fff char generator RAM (can be replaced by a ROM twice as large,
  75.           selection made with jumpers on the board. If it's ROM, the CPU
  76.           cannot fully access it, I think it could read half the data if it
  77.           wanted to but none of the games do that)
  78. 5000-57ff palette ram (palette of 16 colors)
  79. 5800-5fff i/o ports
  80. 6000-ffff ROM (not necessarily fully populated)
  81.  
  82. memory mapped ports:
  83.  
  84. read:
  85. 5800    Dip switch
  86. 5801    Inputs 10-17
  87. 5802    trackball H (optional)
  88. 5803    trackball V (optional)
  89. 5804    Inputs 40-47
  90.  
  91. write:
  92. 5800    watchdog reset
  93. 5801    trackball clear (optional)
  94. 5802    Outputs 20-27
  95. 5803    Flipflop outputs:
  96.         b0: F/B priority
  97.         b1: horiz. flip (sprite bank in Us vs. Them)
  98.         b2: vert. flip (maybe genlock control in the laser disc games)
  99.         b3: Output 33
  100.         b4: coin counter (sprite bank in Q*Bert Qubes)
  101.         b5: Q*Bert: kicker; Q*Bert Qubes: coin counter
  102.         b5/b6: 3 Stooges: joystick input multiplexer
  103.         b7: ?
  104. 5804    Outputs 40-47
  105.  
  106. interrupts:
  107. INTR not connected
  108. NMI connected to vertical blank
  109.  
  110.  
  111.  
  112. Sound processor (6502) memory map (earlier revision, used by games up to Krull):
  113. 0000-0fff RIOT (6532)
  114. 1000-1fff amplitude DAC
  115. 2000-2fff SC01 voice chip
  116. 3000-3fff voice clock DAC
  117. 4000-4fff expansion socket
  118. 5000-5fff expansion socket
  119. 6000-6fff expansion socket or ROM (selected with jumpers on the board)
  120. 7000-7fff ROM
  121. (repeated in 8000-ffff, A15 only used in expansion socket)
  122.  
  123. Use of I/Os on the RIOT:
  124. both ports A and B are programmed as inputs, A is connected to the main
  125. motherboard, and B has SW1 (test) connected on bit 6.
  126.  
  127. interrupts:
  128. INTR is connected to the RIOT, so an INTR can be generated by a variety
  129. of sources, e.g active edge detection on PA7, or timer countdown.
  130. It seems that all gottlieb games program the interrupt conditions so that
  131. a positive active edge on PA7 triggers an interrupt, so the
  132. main board ensures a command is correctly received by sending nul (0)
  133. commands between two commands. Also, the timer interrupt is enabled but
  134. doesn't seem to serve any purpose...(?)
  135.  
  136.  
  137. In the later revision of the sound board, used from M.A.C.H. 3 onwards, there
  138. are two 6502, two 8910, a DAC and a GI SP-0250 speech chip.
  139.  
  140.  
  141. Video timings:
  142. XTAL = 20 MHz
  143. Horizontal video frequency: HSYNC = XTAL/4/318 = 15.72327 kHz
  144. Video frequency: VSYNC = HSYNC/256 = 61.41903 Hz
  145. VBlank duration: 1/VSYNC * (16/256) = 1017.6 us
  146.  
  147. ***************************************************************************/
  148.  
  149. #include "driver.h"
  150. #include "vidhrdw/generic.h"
  151.  
  152.  
  153.  
  154. int gottlieb_vh_start(void);
  155. void gottlieb_vh_stop(void);
  156. WRITE_HANDLER( gottlieb_characterram_w );
  157. WRITE_HANDLER( gottlieb_video_outputs_w );
  158. WRITE_HANDLER( usvsthem_video_outputs_w );
  159. extern unsigned char *gottlieb_characterram;
  160. WRITE_HANDLER( gottlieb_paletteram_w );
  161. void gottlieb_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  162.  
  163. WRITE_HANDLER( gottlieb_sh_w );
  164.  
  165. extern unsigned char *riot_ram;
  166. READ_HANDLER( riot_ram_r );
  167. READ_HANDLER( gottlieb_riot_r );
  168. WRITE_HANDLER( riot_ram_w );
  169. WRITE_HANDLER( gottlieb_riot_w );
  170. WRITE_HANDLER( gottlieb_speech_w );
  171. WRITE_HANDLER( gottlieb_speech_clock_DAC_w );
  172. void gottlieb_sound_init(void);
  173. READ_HANDLER( stooges_sound_input_r );
  174. WRITE_HANDLER( stooges_8910_latch_w );
  175. WRITE_HANDLER( stooges_sound_control_w );
  176. WRITE_HANDLER( gottlieb_nmi_rate_w );
  177. WRITE_HANDLER( gottlieb_cause_dac_nmi_w );
  178.  
  179.  
  180. static void init_machine(void)
  181. {
  182.     UINT8 *ram = memory_region(REGION_CPU1);
  183.     cpu_setbank(1, &ram[0x8000]);
  184.     cpu_setbank(2, &ram[0x0000]);
  185. }
  186.  
  187.  
  188. static int track[2];
  189.  
  190. READ_HANDLER( gottlieb_track_0_r )
  191. {
  192.     return input_port_2_r(offset) - track[0];
  193. }
  194.  
  195. READ_HANDLER( gottlieb_track_1_r )
  196. {
  197.     return input_port_3_r(offset) - track[1];
  198. }
  199.  
  200. WRITE_HANDLER( gottlieb_track_reset_w )
  201. {
  202.     /* reset the trackball counters */
  203.     track[0] = input_port_2_r(offset);
  204.     track[1] = input_port_3_r(offset);
  205. }
  206.  
  207. static int joympx;
  208.  
  209. READ_HANDLER( stooges_IN4_r )
  210. {
  211.     int joy;
  212.  
  213.  
  214.     switch (joympx)
  215.     {
  216.         case 0:
  217.         default:
  218.             joy = ((readinputport(4) >> 0) & 0x0f);    /* joystick 1 */
  219.             break;
  220.         case 1:
  221.             joy = ((readinputport(5) >> 0) & 0x0f);    /* joystick 2 */
  222.             break;
  223.         case 2:
  224.             joy = ((readinputport(5) >> 4) & 0x0f);    /* joystick 3 */
  225.             break;
  226.     }
  227.  
  228.     return joy | (readinputport(4) & 0xf0);
  229. }
  230.  
  231. WRITE_HANDLER( reactor_output_w )
  232. {
  233.     osd_led_w(0,(data & 0x20) >> 5);
  234.     osd_led_w(1,(data & 0x40) >> 6);
  235.     osd_led_w(2,(data & 0x80) >> 7);
  236.     gottlieb_video_outputs_w(offset,data);
  237. }
  238.  
  239. WRITE_HANDLER( stooges_output_w )
  240. {
  241.     joympx = (data >> 5) & 0x03;
  242.     gottlieb_video_outputs_w(offset,data);
  243. }
  244.  
  245.  
  246. static int current_frame = 0x00001;
  247. static int laserdisc_playing;
  248. static int lasermpx;
  249.  
  250. READ_HANDLER( gottlieb_laserdisc_status_r )
  251. {
  252.     switch (offset)
  253.     {
  254.         case 0:
  255.             return (current_frame >> 0) & 0xff;
  256.             break;
  257.         case 1:
  258.             return (current_frame >> 8) & 0xff;
  259.             break;
  260.         case 2:
  261.             if (lasermpx == 1)
  262.                 /* bits 0-2 frame number MSN */
  263.                 /* bit 3 audio buffer ready */
  264.                 /* bit 4 ready to send new laserdisc command? */
  265.                 /* bit 5 disc ready */
  266.                 /* bit 6 break in audio trasmission */
  267.                 /* bit 7 missing audio clock */
  268.                 return ((current_frame >> 16) & 0x07) | 0x10 | (rand() & 0x28);
  269.             else    /* read audio buffer */
  270.                 return rand();
  271.             break;
  272.     }
  273.  
  274.     return 0;
  275. }
  276.  
  277. WRITE_HANDLER( gottlieb_laserdisc_mpx_w )
  278. {
  279.     lasermpx = data & 1;
  280. }
  281.  
  282. WRITE_HANDLER( gottlieb_laserdisc_command_w )
  283. {
  284.     static int loop;
  285.     int cmd;
  286.     static int lastcmd;
  287.  
  288.  
  289.     /* commands are written in three steps, the first two the command is */
  290.     /* written (maybe one to load the latch, the other to start the send), */
  291.     /* the third 0 (maybe to clear the latch) */
  292.     if (data == 0) return;
  293.     if (loop++ & 1) return;
  294.  
  295.     if ((data & 0xe0) != 0x20)
  296.     {
  297. logerror("error: laserdisc command %02x\n",data);
  298.         return;
  299.     }
  300.  
  301.     cmd =    ((data & 0x10) >> 4) |
  302.             ((data & 0x08) >> 2) |
  303.             ((data & 0x04) >> 0) |
  304.             ((data & 0x02) << 2) |
  305.             ((data & 0x01) << 4);
  306.  
  307. logerror("laserdisc command %02x -> %02x\n",data,cmd);
  308.     if (lastcmd == 0x0b && (cmd & 0x10))    /* seek frame # */
  309.     {
  310.         current_frame = (current_frame << 4) | (cmd & 0x0f);
  311.     }
  312.     else
  313.     {
  314.         if (cmd == 0x04)    /* step forward */
  315.         {
  316.             laserdisc_playing = 0;
  317.             current_frame++;
  318.         }
  319.         if (cmd == 0x05) laserdisc_playing = 1;    /* play */
  320.         if (cmd == 0x0f) laserdisc_playing = 0;    /* stop */
  321.         if (cmd == 0x0b) laserdisc_playing = 0;    /* seek frame */
  322.         lastcmd = cmd;
  323.     }
  324. }
  325.  
  326. int gottlieb_interrupt(void)
  327. {
  328.     if (laserdisc_playing) current_frame++;
  329.  
  330.     return nmi_interrupt();
  331. }
  332.  
  333.  
  334. static unsigned char *nvram;
  335. static size_t nvram_size;
  336.  
  337. static void nvram_handler(void *file,int read_or_write)
  338. {
  339.     if (read_or_write)
  340.         osd_fwrite(file,nvram,nvram_size);
  341.     else
  342.     {
  343.         if (file)
  344.             osd_fread(file,nvram,nvram_size);
  345.         else
  346.             memset(nvram,0xff,nvram_size);
  347.     }
  348. }
  349.  
  350.  
  351.  
  352. static struct MemoryReadAddress reactor_readmem[] =
  353. {
  354.     { 0x00000, 0x01fff, MRA_RAM },
  355.     { 0x03000, 0x033ff, MRA_RAM },
  356.     { 0x04000, 0x04fff, MRA_RAM },
  357.     { 0x07000, 0x07000, input_port_0_r },    /* DSW */
  358.     { 0x07001, 0x07001, input_port_1_r },    /* buttons */
  359.     { 0x07002, 0x07002, gottlieb_track_0_r },    /* trackball H */
  360.     { 0x07003, 0x07003, gottlieb_track_1_r },    /* trackball V */
  361.     { 0x07004, 0x07004, input_port_4_r },    /* joystick */
  362.     { 0x08000, 0x0ffff, MRA_ROM },
  363.     /* map the ROM into Fxxxx so we can boot */
  364.     { 0xf8000, 0xfffff, MRA_BANK1 },
  365.     { -1 }  /* end of table */
  366. };
  367.  
  368. static struct MemoryWriteAddress reactor_writemem[] =
  369. {
  370.     { 0x00000, 0x01fff, MWA_RAM },
  371.     { 0x02000, 0x020ff, MWA_RAM, &spriteram, &spriteram_size },
  372.     { 0x03000, 0x033ff, videoram_w, &videoram, &videoram_size },
  373.     { 0x03400, 0x037ff, videoram_w },    /* mirror address, some games write to it */
  374.     { 0x04000, 0x04fff, gottlieb_characterram_w, &gottlieb_characterram },
  375.     { 0x06000, 0x0601f, gottlieb_paletteram_w, &paletteram },
  376.     { 0x07000, 0x07000, watchdog_reset_w },
  377.     { 0x07001, 0x07001, gottlieb_track_reset_w },
  378.     { 0x07002, 0x07002, gottlieb_sh_w }, /* sound/speech command */
  379.     { 0x07003, 0x07003, reactor_output_w },       /* OUT1 */
  380.     { 0x08000, 0x0ffff, MWA_ROM },
  381.     { -1 }  /* end of table */
  382. };
  383.  
  384. static struct MemoryReadAddress gottlieb_readmem[] =
  385. {
  386.     { 0x00000, 0x00fff, MRA_RAM },
  387.     { 0x01000, 0x01fff, MRA_RAM },    /* or ROM */
  388.     { 0x02000, 0x02fff, MRA_RAM },    /* or ROM */
  389.     { 0x03800, 0x03bff, MRA_RAM },
  390.     { 0x04000, 0x04fff, MRA_RAM },
  391.     { 0x05800, 0x05800, input_port_0_r },    /* DSW */
  392.     { 0x05801, 0x05801, input_port_1_r },    /* buttons */
  393.     { 0x05802, 0x05802, gottlieb_track_0_r },    /* trackball H */
  394.     { 0x05803, 0x05803, gottlieb_track_1_r },    /* trackball V */
  395.     { 0x05804, 0x05804, input_port_4_r },    /* joystick */
  396.     { 0x05805, 0x05807, gottlieb_laserdisc_status_r },
  397.     { 0x06000, 0x0ffff, MRA_ROM },
  398.     /* Us vs Them and Q*bert Qubes use the Exxxx address space */
  399.     { 0xe5800, 0xe5800, input_port_0_r },    /* DSW */
  400.     { 0xe5801, 0xe5801, input_port_1_r },    /* buttons */
  401.     { 0xe5802, 0xe5802, gottlieb_track_0_r },    /* trackball H */
  402.     { 0xe5803, 0xe5803, gottlieb_track_1_r },    /* trackball V */
  403.     { 0xe5804, 0xe5804, input_port_4_r },    /* joystick */
  404.     { 0xe5805, 0xe5807, gottlieb_laserdisc_status_r },
  405.     { 0xe0000, 0xeffff, MRA_BANK2 },
  406.     /* map the ROM into Fxxxx so we can boot */
  407.     { 0xf8000, 0xfffff, MRA_BANK1 },
  408.     { -1 }  /* end of table */
  409. };
  410.  
  411. static struct MemoryWriteAddress gottlieb_writemem[] =
  412. {
  413.     { 0x00000, 0x00fff, MWA_RAM, &nvram, &nvram_size },
  414.     { 0x01000, 0x01fff, MWA_RAM },    /* ROM in Krull */
  415.     { 0x02000, 0x02fff, MWA_RAM },    /* ROM in Krull and 3 Stooges */
  416.     { 0x03000, 0x030ff, MWA_RAM, &spriteram, &spriteram_size },
  417.     { 0x03800, 0x03bff, videoram_w, &videoram, &videoram_size },
  418.     { 0x03c00, 0x03fff, videoram_w },    /* mirror address, some games write to it */
  419.     { 0x04000, 0x04fff, gottlieb_characterram_w, &gottlieb_characterram },
  420.     { 0x05000, 0x0501f, gottlieb_paletteram_w, &paletteram },
  421.     { 0x05800, 0x05800, watchdog_reset_w },
  422.     { 0x05801, 0x05801, gottlieb_track_reset_w },
  423.     { 0x05802, 0x05802, gottlieb_sh_w }, /* sound/speech command */
  424.     { 0x05803, 0x05803, gottlieb_video_outputs_w },       /* OUT1 */
  425.     { 0x06000, 0x0ffff, MWA_ROM },
  426.     /* Q*bert Qubes uses the Exxxx address space */
  427.     { 0xe0000, 0xe37ff, MWA_BANK2 },
  428.     { 0xe3800, 0xe3bff, videoram_w },
  429.     { 0xe3c00, 0xe3fff, videoram_w },    /* mirror address, some games write to it */
  430.     { 0xe4000, 0xe4fff, gottlieb_characterram_w },
  431.     { 0xe5000, 0xe501f, gottlieb_paletteram_w },
  432.     { 0xe5800, 0xe5800, watchdog_reset_w },
  433.     { 0xe5801, 0xe5801, gottlieb_track_reset_w },
  434.     { 0xe5802, 0xe5802, gottlieb_sh_w }, /* sound/speech command */
  435.     { 0xe5803, 0xe5803, gottlieb_video_outputs_w },       /* OUT1 */
  436.     { -1 }  /* end of table */
  437. };
  438.  
  439.  
  440. /* same as above, different video_outputs plus laser disc control outputs */
  441. static struct MemoryWriteAddress usvsthem_writemem[] =
  442. {
  443.     { 0x00000, 0x00fff, MWA_RAM, &nvram, &nvram_size },
  444.     { 0x01000, 0x01fff, MWA_RAM },    /* ROM in Krull */
  445.     { 0x02000, 0x02fff, MWA_RAM },    /* ROM in Krull and 3 Stooges */
  446.     { 0x03000, 0x030ff, MWA_RAM, &spriteram, &spriteram_size },
  447.     { 0x03800, 0x03bff, videoram_w, &videoram, &videoram_size },
  448.     { 0x03c00, 0x03fff, videoram_w },    /* mirror address, some games write to it */
  449.     { 0x04000, 0x04fff, gottlieb_characterram_w, &gottlieb_characterram },
  450.     { 0x05000, 0x0501f, gottlieb_paletteram_w, &paletteram },
  451.     { 0x05800, 0x05800, watchdog_reset_w },
  452.     { 0x05801, 0x05801, gottlieb_track_reset_w },
  453.     { 0x05802, 0x05802, gottlieb_sh_w }, /* sound/speech command */
  454.     { 0x05803, 0x05803, usvsthem_video_outputs_w },       /* OUT1 */
  455.     { 0x05805, 0x05805, gottlieb_laserdisc_command_w },    /* command for the player */
  456.     { 0x05806, 0x05806, gottlieb_laserdisc_mpx_w },
  457.     { 0x06000, 0x0ffff, MWA_ROM },
  458.     /* Us vs Them uses the Exxxx address space */
  459.     { 0xe0000, 0xe37ff, MWA_BANK2 },
  460.     { 0xe3800, 0xe3bff, videoram_w },
  461.     { 0xe3c00, 0xe3fff, videoram_w },    /* mirror address, some games write to it */
  462.     { 0xe4000, 0xe4fff, gottlieb_characterram_w },
  463.     { 0xe5000, 0xe501f, gottlieb_paletteram_w },
  464.     { 0xe5800, 0xe5800, watchdog_reset_w },
  465.     { 0xe5801, 0xe5801, gottlieb_track_reset_w },
  466.     { 0xe5802, 0xe5802, gottlieb_sh_w }, /* sound/speech command */
  467.     { 0xe5803, 0xe5803, usvsthem_video_outputs_w },       /* OUT1 */
  468.     { 0xe5805, 0xe5805, gottlieb_laserdisc_command_w },    /* command for the player */
  469.     { 0xe5806, 0xe5806, gottlieb_laserdisc_mpx_w },
  470.     { -1 }  /* end of table */
  471. };
  472.  
  473. /* same as above, different IN4 */
  474. static struct MemoryReadAddress stooges_readmem[] =
  475. {
  476.     { 0x00000, 0x00fff, MRA_RAM },
  477.     { 0x01000, 0x01fff, MRA_RAM },
  478.     { 0x02000, 0x02fff, MRA_ROM },
  479.     { 0x03800, 0x03bff, MRA_RAM },
  480.     { 0x04000, 0x04fff, MRA_RAM },
  481.     { 0x05800, 0x05800, input_port_0_r },    /* DSW */
  482.     { 0x05801, 0x05801, input_port_1_r },    /* buttons */
  483.     { 0x05802, 0x05802, gottlieb_track_0_r },    /* trackball H */
  484.     { 0x05803, 0x05803, gottlieb_track_1_r },    /* trackball V */
  485.     { 0x05804, 0x05804, stooges_IN4_r },    /* joystick */
  486.     { 0x06000, 0x0ffff, MRA_ROM },
  487.     /* map the ROM into Fxxxx so we can boot */
  488.     { 0xf8000, 0xfffff, MRA_BANK1 },
  489.     { -1 }  /* end of table */
  490. };
  491.  
  492. /* same as above, different video_outputs */
  493. static struct MemoryWriteAddress stooges_writemem[] =
  494. {
  495.     { 0x00000, 0x00fff, MWA_RAM, &nvram, &nvram_size },
  496.     { 0x01000, 0x01fff, MWA_RAM },
  497.     { 0x02000, 0x02fff, MWA_ROM },
  498.     { 0x03000, 0x030ff, MWA_RAM, &spriteram, &spriteram_size },
  499.     { 0x03800, 0x03bff, videoram_w, &videoram, &videoram_size },
  500.     { 0x03c00, 0x03fff, videoram_w },    /* mirror address, some games write to it */
  501.     { 0x04000, 0x04fff, gottlieb_characterram_w, &gottlieb_characterram },
  502.     { 0x05000, 0x0501f, gottlieb_paletteram_w, &paletteram },
  503.     { 0x05800, 0x05800, watchdog_reset_w },
  504.     { 0x05801, 0x05801, gottlieb_track_reset_w },
  505.     { 0x05802, 0x05802, gottlieb_sh_w }, /* sound/speech command */
  506.     { 0x05803, 0x05803, stooges_output_w },       /* OUT1 */
  507.     { 0x06000, 0x0ffff, MWA_ROM },
  508.     { -1 }  /* end of table */
  509. };
  510.  
  511.  
  512.  
  513. struct MemoryReadAddress gottlieb_sound_readmem[] =
  514. {
  515.     { 0x0000, 0x01ff, riot_ram_r },
  516.     { 0x0200, 0x03ff, gottlieb_riot_r },
  517.     { 0x6000, 0x7fff, MRA_ROM },
  518.              /* A15 not decoded except in expansion socket */
  519.     { 0x8000, 0x81ff, riot_ram_r },
  520.     { 0x8200, 0x83ff, gottlieb_riot_r },
  521.     { 0xe000, 0xffff, MRA_ROM },
  522.     { -1 }  /* end of table */
  523. };
  524.  
  525. struct MemoryWriteAddress gottlieb_sound_writemem[] =
  526. {
  527.     { 0x0000, 0x01ff, riot_ram_w, &riot_ram },
  528.     { 0x0200, 0x03ff, gottlieb_riot_w },
  529.     { 0x1000, 0x1000, DAC_0_data_w },
  530.     { 0x2000, 0x2000, gottlieb_speech_w },
  531.     { 0x3000, 0x3000, gottlieb_speech_clock_DAC_w },
  532.     { 0x6000, 0x7fff, MWA_ROM },
  533.              /* A15 not decoded except in expansion socket */
  534.     { 0x8000, 0x81ff, riot_ram_w },
  535.     { 0x8200, 0x83ff, gottlieb_riot_w },
  536.     { 0x9000, 0x9000, DAC_0_data_w },
  537.     { 0xa000, 0xa000, gottlieb_speech_w },
  538.     { 0xb000, 0xb000, gottlieb_speech_clock_DAC_w },
  539.     { 0xe000, 0xffff, MWA_ROM },
  540.     { -1 }  /* end of table */
  541. };
  542.  
  543.  
  544. static struct MemoryReadAddress stooges_sound_readmem[] =
  545. {
  546.     { 0x0000, 0x03ff, MRA_RAM },
  547.     { 0x8000, 0x8000, soundlatch_r },
  548.     { 0xe000, 0xffff, MRA_ROM },
  549.     { -1 }  /* end of table */
  550. };
  551.  
  552. struct MemoryWriteAddress stooges_sound_writemem[] =
  553. {
  554.     { 0x0000, 0x03ff, MWA_RAM },
  555.     { 0x4000, 0x4001, DAC_0_data_w },
  556.     { 0xe000, 0xffff, MWA_ROM },
  557.     { -1 }  /* end of table */
  558. };
  559.  
  560.  
  561. static struct MemoryReadAddress stooges_sound2_readmem[] =
  562. {
  563.     { 0x0000, 0x03ff, MRA_RAM },
  564.     { 0x6000, 0x6000, stooges_sound_input_r },    /* various signals */
  565.     { 0xa800, 0xa800, soundlatch_r },
  566.     { 0xc000, 0xffff, MRA_ROM },
  567.     { -1 }  /* end of table */
  568. };
  569.  
  570. struct MemoryWriteAddress stooges_sound2_writemem[] =
  571. {
  572.     { 0x0000, 0x03ff, MWA_RAM },
  573.     { 0x2000, 0x2000, MWA_NOP },    /* speech chip. The game sends strings */
  574.                                     /* of 15 bytes (clocked by 4000). The chip also */
  575.                                     /* checks a DATA REQUEST bit in 6000. */
  576.     { 0x4000, 0x4000, stooges_sound_control_w },
  577.     { 0x8000, 0x8000, stooges_8910_latch_w },
  578.     { 0xa000, 0xa000, gottlieb_nmi_rate_w },    /* the timer generates NMIs */
  579.     { 0xb000, 0xb000, gottlieb_cause_dac_nmi_w },
  580.     { 0xc000, 0xffff, MWA_ROM },
  581.     { -1 }  /* end of table */
  582. };
  583.  
  584.  
  585.  
  586. INPUT_PORTS_START( reactor )
  587.     PORT_START    /* DSW */
  588.     PORT_DIPNAME( 0x01, 0x01, "Sound with Logos" )
  589.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  590.     PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  591.     PORT_DIPNAME( 0x02, 0x02, "Bounce Chambers Points" )
  592.     PORT_DIPSETTING(    0x00, "10" )
  593.     PORT_DIPSETTING(    0x02, "15" )
  594.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Free_Play ) )
  595.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  596.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  597.     PORT_DIPNAME( 0x08, 0x08, "Sound with Instructions" )
  598.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  599.     PORT_DIPSETTING(    0x08, DEF_STR( On ) )
  600.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) )
  601.     PORT_DIPSETTING(    0x10, DEF_STR( Upright ) )
  602.     PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
  603.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Coinage ) )
  604.     PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
  605.     PORT_DIPSETTING(    0x20, DEF_STR( 1C_1C ) )
  606.     PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Bonus_Life ) )
  607.     PORT_DIPSETTING(    0x00, "10000" )
  608.     PORT_DIPSETTING(    0x40, "12000" )
  609.     PORT_DIPSETTING(    0xc0, "15000" )
  610.     PORT_DIPSETTING(    0x80, "20000" )
  611.  
  612.     PORT_START    /* IN1 */
  613.     PORT_BITX(0x01, IP_ACTIVE_HIGH, IPT_SERVICE, "Select in Service Mode", KEYCODE_F1, IP_JOY_NONE )
  614.     PORT_SERVICE( 0x02, IP_ACTIVE_LOW )
  615.     PORT_BIT ( 0xfc, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  616.  
  617.     PORT_START    /* trackball H */
  618.     PORT_ANALOG( 0xff, 0, IPT_TRACKBALL_X, 15, 20, 0, 0 )
  619.  
  620.     PORT_START    /* trackball V */
  621.     PORT_ANALOG( 0xff, 0, IPT_TRACKBALL_Y, 15, 20, 0, 0 )
  622.  
  623.     PORT_START    /* IN4 */
  624.     PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
  625.     PORT_BIT ( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
  626.     PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  627.     PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  628.     PORT_BIT ( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
  629.     PORT_BIT ( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
  630.     PORT_BIT ( 0xc0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  631. INPUT_PORTS_END
  632.  
  633. INPUT_PORTS_START( mplanets )
  634.     PORT_START    /* DSW */
  635.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
  636.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  637.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  638.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Bonus_Life ) )
  639.     PORT_DIPSETTING(    0x00, "10000" )
  640.     PORT_DIPSETTING(    0x02, "12000" )
  641.     PORT_DIPNAME( 0x08, 0x00, "Allow Round Select" )
  642.     PORT_DIPSETTING(    0x00, DEF_STR( No ) )
  643.     PORT_DIPSETTING(    0x08, DEF_STR( Yes ) )
  644.     PORT_DIPNAME( 0x14, 0x00, DEF_STR( Coinage ) )
  645.     PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
  646.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  647.     PORT_DIPSETTING(    0x10, DEF_STR( 1C_2C ) )
  648.     PORT_DIPSETTING(    0x14, DEF_STR( Free_Play ) )
  649.     PORT_DIPNAME( 0x20, 0x00, DEF_STR( Lives ) )
  650.     PORT_DIPSETTING(    0x00, "3" )
  651.     PORT_DIPSETTING(    0x20, "5" )
  652.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) )
  653.     PORT_DIPSETTING(    0x40, "Easy" )
  654.     PORT_DIPSETTING(    0x00, "Medium" )
  655.     PORT_DIPSETTING(    0x80, "Hard" )
  656.     PORT_DIPSETTING(    0xc0, "Hardest" )
  657.  
  658.     PORT_START    /* IN1 */
  659.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
  660.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
  661.     PORT_BIT( 0x3c, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  662.     PORT_BITX(0x40, IP_ACTIVE_HIGH, IPT_SERVICE, "Select in Service Mode", KEYCODE_F1, IP_JOY_NONE )
  663.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  664.  
  665.     PORT_START    /* trackball H not used */
  666.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  667.  
  668.     PORT_START    /* trackball V (dial) */
  669.     PORT_ANALOGX( 0xff, 0x00, IPT_DIAL, 5, 10, 0, 0, KEYCODE_Z, KEYCODE_X, 0, 0 )
  670.  
  671.     PORT_START    /* IN3 */
  672.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY )
  673.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  674.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  675.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  676.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  677.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
  678.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
  679.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  680. INPUT_PORTS_END
  681.  
  682. INPUT_PORTS_START( qbert )
  683.     PORT_START      /* DSW */
  684.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
  685.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  686.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  687.     PORT_DIPNAME( 0x02, 0x02, "Kicker" )
  688.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  689.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  690.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) )
  691.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  692.     PORT_DIPSETTING(    0x04, DEF_STR( Cocktail ) )
  693.     PORT_BITX( 0x08, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Auto Round Advance", IP_KEY_NONE, IP_JOY_NONE )
  694.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  695.     PORT_DIPSETTING(    0x08, DEF_STR( On ) )
  696.     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Free_Play ) )
  697.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  698.     PORT_DIPSETTING(    0x10, DEF_STR( On ) )
  699.     PORT_DIPNAME( 0x20, 0x00, "SW5" )
  700.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  701.     PORT_DIPSETTING(    0x20, DEF_STR( On ) )
  702.     PORT_DIPNAME( 0x40, 0x00, "SW7" )
  703.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  704.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  705.     PORT_DIPNAME( 0x80, 0x00, "SW8" )
  706.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  707.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  708.     PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
  709. /* 0x40 must be connected to the IP16 line */
  710.  
  711.     PORT_START      /* buttons */
  712.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
  713.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
  714.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
  715.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
  716.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  717.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  718.     PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
  719.     PORT_BITX(0x80, IP_ACTIVE_HIGH, IPT_SERVICE, "Select in Service Mode", KEYCODE_F1, IP_JOY_NONE )
  720.  
  721.     PORT_START    /* trackball H not used */
  722.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  723.  
  724.     PORT_START    /* trackball V not used */
  725.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  726.  
  727.     PORT_START      /* joystick */
  728.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY )
  729.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_4WAY )
  730.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_4WAY )
  731.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_4WAY )
  732.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL )
  733.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_4WAY | IPF_COCKTAIL )
  734.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_4WAY | IPF_COCKTAIL )
  735.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_4WAY | IPF_COCKTAIL )
  736. INPUT_PORTS_END
  737.  
  738. INPUT_PORTS_START( qbertqub )
  739.     PORT_START      /* DSW */
  740.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  741.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  742.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  743.     PORT_DIPNAME( 0x35, 0x00, DEF_STR( Coinage ) )
  744.     PORT_DIPSETTING(    0x24, "A 2/1 B 2/1" )
  745.     PORT_DIPSETTING(    0x14, "A 1/1 B 4/1" )
  746.     PORT_DIPSETTING(    0x30, "A 1/1 B 3/1" )
  747.     PORT_DIPSETTING(    0x10, "A 1/1 B 2/1" )
  748.     PORT_DIPSETTING(    0x00, "A 1/1 B 1/1" )
  749.     PORT_DIPSETTING(    0x11, "A 2/3 B 2/1" )
  750.     PORT_DIPSETTING(    0x15, "A 1/2 B 3/1" )
  751.     PORT_DIPSETTING(    0x20, "A 1/2 B 2/1" )
  752.     PORT_DIPSETTING(    0x21, "A 1/2 B 1/1" )
  753.     PORT_DIPSETTING(    0x31, "A 1/2 B 1/5" )
  754.     PORT_DIPSETTING(    0x04, "A 1/3 B 2/1" )
  755.     PORT_DIPSETTING(    0x05, "A 1/3 B 1/1" )
  756.     PORT_DIPSETTING(    0x35, DEF_STR( Free_Play ) )
  757. /* 0x25 DEF_STR( 2C_1C )
  758.    0x01 DEF_STR( 1C_1C )
  759.    0x34 DEF_STR( Free_Play ) */
  760.     PORT_DIPNAME( 0x02, 0x00, "1st Bonus Life" )
  761.     PORT_DIPSETTING(    0x00, "10000" )
  762.     PORT_DIPSETTING(    0x02, "15000" )
  763.     PORT_DIPNAME( 0x40, 0x00, "Additional Bonus Life" )
  764.     PORT_DIPSETTING(    0x00, "20000" )
  765.     PORT_DIPSETTING(    0x40, "25000" )
  766.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Difficulty ) )
  767.     PORT_DIPSETTING(    0x00, "Normal" )
  768.     PORT_DIPSETTING(    0x80, "Hard" )
  769.  
  770.     PORT_START      /* buttons */
  771.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
  772.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
  773.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 )
  774.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
  775.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  776.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  777.     PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
  778.     PORT_BITX(0x80, IP_ACTIVE_HIGH, IPT_SERVICE, "Select in Service Mode", KEYCODE_F1, IP_JOY_NONE )
  779.  
  780.     PORT_START    /* trackball H not used */
  781.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  782.  
  783.     PORT_START    /* trackball V not used */
  784.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  785.  
  786.     PORT_START      /* joystick */
  787.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY )
  788.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_4WAY )
  789.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_4WAY )
  790.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_4WAY )
  791.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  792.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  793.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  794.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  795. INPUT_PORTS_END
  796.  
  797. INPUT_PORTS_START( krull )
  798.     PORT_START      /* DSW0 */
  799.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
  800.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  801.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  802.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Difficulty ) )
  803.     PORT_DIPSETTING(    0x00, "Normal" )
  804.     PORT_DIPSETTING(    0x02, "Hard" )
  805.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Lives ) )
  806.     PORT_DIPSETTING(    0x00, "3" )
  807.     PORT_DIPSETTING(    0x08, "5" )
  808.     PORT_DIPNAME( 0x14, 0x00, DEF_STR( Coinage ) )
  809.     PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
  810.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  811.     PORT_DIPSETTING(    0x10, DEF_STR( 1C_2C ) )
  812.     PORT_DIPSETTING(    0x14, DEF_STR( Free_Play ) )
  813.     PORT_DIPNAME( 0x20, 0x00, "Hexagon" )
  814.     PORT_DIPSETTING(    0x00, "Roving" )
  815.     PORT_DIPSETTING(    0x20, "Stationary" )
  816.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Bonus_Life ) )
  817.     PORT_DIPSETTING(    0x40, "30000 30000" )
  818.     PORT_DIPSETTING(    0x00, "30000 50000" )
  819.     PORT_DIPSETTING(    0x80, "40000 50000" )
  820.     PORT_DIPSETTING(    0xc0, "50000 75000" )
  821.  
  822.     PORT_START      /* IN0 */
  823.     PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
  824.     PORT_BITX(0x02, IP_ACTIVE_HIGH, IPT_SERVICE, "Select in Service Mode", KEYCODE_F1, IP_JOY_NONE )
  825.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
  826.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
  827.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  828.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  829.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 )
  830.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
  831.  
  832.     PORT_START    /* trackball H not used */
  833.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  834.  
  835.     PORT_START    /* trackball V not used */
  836.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  837.  
  838.     PORT_START      /* IN3 */
  839.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP    | IPF_8WAY )
  840.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT | IPF_8WAY )
  841.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN  | IPF_8WAY )
  842.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT  | IPF_8WAY )
  843.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP     | IPF_8WAY )
  844.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT  | IPF_8WAY )
  845.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN   | IPF_8WAY )
  846.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT   | IPF_8WAY )
  847. INPUT_PORTS_END
  848.  
  849. INPUT_PORTS_START( mach3 )
  850.     PORT_START      /* DSW0 */
  851.     /* TODO: values are different for 5 lives */
  852.     PORT_DIPNAME( 0x09, 0x08, DEF_STR( Coinage ) )
  853.     PORT_DIPSETTING(    0x09, DEF_STR( 4C_1C ) )
  854.     PORT_DIPSETTING(    0x01, DEF_STR( 3C_1C ) )
  855.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  856.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  857.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Difficulty ) )
  858.     PORT_DIPSETTING(    0x00, "Normal" )
  859.     PORT_DIPSETTING(    0x02, "Hard" )
  860.     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Lives ) )
  861.     PORT_DIPSETTING(    0x00, "3" )
  862.     PORT_DIPSETTING(    0x10, "5" )
  863.     PORT_DIPNAME( 0x24, 0x00, DEF_STR( Bonus_Life ) )
  864.     PORT_DIPSETTING(    0x00, "10000 10000" )
  865.     PORT_DIPSETTING(    0x04, "10000 20000" )
  866.     PORT_DIPSETTING(    0x20, "10000 40000" )
  867.     PORT_DIPSETTING(    0x24, "20000 60000" )
  868.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) )
  869.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  870.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  871.     PORT_BITX(    0x80, 0x80, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Infinite Lives", IP_KEY_NONE, IP_JOY_NONE )
  872.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  873.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  874.  
  875.     PORT_START      /* IN0 */
  876.     PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
  877.     PORT_BITX(0x02, IP_ACTIVE_HIGH, IPT_SERVICE, "Select in Service Mode", KEYCODE_F1, IP_JOY_NONE )
  878.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
  879.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
  880.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  881.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )
  882.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 )
  883.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
  884.  
  885.     PORT_START    /* trackball H not used */
  886.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  887.  
  888.     PORT_START    /* trackball V not used */
  889.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  890.  
  891.     PORT_START      /* IN3 */
  892.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY )
  893.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  894.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  895.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  896.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  897.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  898.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  899.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  900. INPUT_PORTS_END
  901.  
  902. INPUT_PORTS_START( usvsthem )
  903.     PORT_START      /* DSW0 */
  904.     /* TODO: values are different for 5 lives */
  905.     PORT_DIPNAME( 0x09, 0x00, DEF_STR( Coinage ) )
  906.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  907.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  908.     PORT_DIPSETTING(    0x01, DEF_STR( Free_Play ) )
  909. /*    PORT_DIPSETTING(    0x09, DEF_STR( Free_Play ) ) */
  910.     PORT_DIPNAME( 0x02, 0x00, "Unknown" )
  911.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  912.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  913.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Difficulty ) )
  914.     PORT_DIPSETTING(    0x00, "Normal" )
  915.     PORT_DIPSETTING(    0x04, "Hard" )
  916.     PORT_DIPNAME( 0x10, 0x00, "Unknown" )
  917.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  918.     PORT_DIPSETTING(    0x10, DEF_STR( On ) )
  919.     PORT_DIPNAME( 0x20, 0x00, "Unknown" )
  920.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  921.     PORT_DIPSETTING(    0x20, DEF_STR( On ) )
  922.     PORT_DIPNAME( 0x40, 0x00, "Unknown" )
  923.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  924.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  925.     PORT_DIPNAME( 0x80, 0x00, "Unknown" )
  926.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  927.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  928.  
  929.     PORT_START      /* IN0 */
  930.     PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
  931.     PORT_BITX(0x02, IP_ACTIVE_HIGH, IPT_SERVICE, "Select in Service Mode", KEYCODE_F1, IP_JOY_NONE )
  932.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
  933.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
  934.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  935.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )
  936.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 )
  937.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
  938.  
  939.     PORT_START    /* trackball H not used */
  940.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  941.  
  942.     PORT_START    /* trackball V not used */
  943.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  944.  
  945.     PORT_START      /* IN3 */
  946.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY )
  947.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  948.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  949.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  950.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  951.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  952.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 )
  953.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  954. INPUT_PORTS_END
  955.  
  956. INPUT_PORTS_START( 3stooges )
  957.     PORT_START    /* DSW */
  958.     PORT_DIPNAME (0x01, 0x00, DEF_STR( Demo_Sounds ) )
  959.     PORT_DIPSETTING (   0x01, DEF_STR( Off ) )
  960.     PORT_DIPSETTING (   0x00, DEF_STR( On ) )
  961.     PORT_DIPNAME (0x02, 0x00, DEF_STR( Difficulty ) )
  962.     PORT_DIPSETTING (   0x00, "Normal" )
  963.     PORT_DIPSETTING (   0x02, "Hard" )
  964.     PORT_DIPNAME (0x08, 0x00, DEF_STR( Lives ) )
  965.     PORT_DIPSETTING (   0x00, "3" )
  966.     PORT_DIPSETTING (   0x08, "5" )
  967.     PORT_DIPNAME (0x14, 0x00, DEF_STR( Coinage ) )
  968.     PORT_DIPSETTING (   0x04, DEF_STR( 2C_1C ) )
  969.     PORT_DIPSETTING (   0x00, DEF_STR( 1C_1C ) )
  970.     PORT_DIPSETTING (   0x10, DEF_STR( 1C_2C ) )
  971.     PORT_DIPSETTING (   0x14, DEF_STR( Free_Play ) )
  972.     PORT_DIPNAME( 0x20, 0x00, "Unknown" )
  973.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  974.     PORT_DIPSETTING(    0x20, DEF_STR( On ) )
  975.     PORT_DIPNAME (0x40, 0x00, "1st Bonus Life at" )
  976.     PORT_DIPSETTING (   0x40, "10000" )
  977.     PORT_DIPSETTING (   0x00, "20000" )
  978.     PORT_DIPNAME (0x80, 0x00, "And Bonus Life Every" )
  979.     PORT_DIPSETTING (   0x80, "10000" )
  980.     PORT_DIPSETTING (   0x00, "20000" )
  981.  
  982.     PORT_START    /* IN1 */
  983.     PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
  984.     PORT_BITX(0x02, IP_ACTIVE_HIGH, IPT_SERVICE, "Select in Service Mode", KEYCODE_F1, IP_JOY_NONE )
  985.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 )
  986.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
  987.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_TILT )
  988.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  989.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  990.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  991.  
  992.     PORT_START    /* trackball H not used */
  993.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  994.  
  995.     PORT_START    /* trackball V not used */
  996.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  997.  
  998.     PORT_START    /* joystick 2 (Moe) */
  999.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_PLAYER2 | IPF_8WAY )
  1000.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 | IPF_8WAY )
  1001.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_PLAYER2 | IPF_8WAY )
  1002.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_PLAYER2 | IPF_8WAY )
  1003.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2 )
  1004.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER1 )
  1005.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER3 )
  1006.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1007.  
  1008.     /* the bottom four bits of the previous port are multiplexed among */
  1009.     /* three joysticks - the following port contains settings for the other two */
  1010.     PORT_START
  1011.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_PLAYER3 | IPF_8WAY )
  1012.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_PLAYER3 | IPF_8WAY )
  1013.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_PLAYER3 | IPF_8WAY )
  1014.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_PLAYER3 | IPF_8WAY )
  1015.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_PLAYER1 | IPF_8WAY )
  1016.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 | IPF_8WAY )
  1017.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_PLAYER1 | IPF_8WAY )
  1018.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_PLAYER1 | IPF_8WAY )
  1019. INPUT_PORTS_END
  1020.  
  1021. INPUT_PORTS_START( curvebal )
  1022.     PORT_START      /* DSW0 */
  1023.     PORT_DIPNAME( 0x08, 0x00, "2 Players Game" )
  1024.     PORT_DIPSETTING(    0x08, "1 Credit" )
  1025.     PORT_DIPSETTING(    0x00, "2 Credits" )
  1026.     PORT_DIPNAME( 0x11, 0x00, DEF_STR( Difficulty ) )
  1027.     PORT_DIPSETTING(    0x00, "Easy" )
  1028.     PORT_DIPSETTING(    0x10, "Medium" )
  1029.     PORT_DIPSETTING(    0x01, "Hard" )
  1030.     PORT_DIPSETTING(    0x11, "Hardest" )
  1031.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) )
  1032.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1033.     PORT_DIPSETTING(    0x04, DEF_STR( On ) )
  1034.     PORT_DIPNAME( 0x20, 0x00, "Coins" )
  1035.     PORT_DIPSETTING(    0x00, "Normal" )
  1036.     PORT_DIPSETTING(    0x20, "French" )
  1037.     /* TODO: coinage is different when French is selected */
  1038. /* PORT_DIPNAME( 0xc2, 0x00, "French Coinage" )
  1039. PORT_DIPSETTING(    0x42, "A 3/1 B 1/2" )
  1040. PORT_DIPSETTING(    0x82, "A 1/5 B 1/2" )
  1041. PORT_DIPSETTING(    0x02, "A 2/1 B 2/3" )
  1042. PORT_DIPSETTING(    0xc0, "A 2/1 B 2/1" )
  1043. PORT_DIPSETTING(    0x80, "A 1/1 B 1/2" )
  1044. PORT_DIPSETTING(    0x40, "A 1/1 B 1/3" )
  1045. PORT_DIPSETTING(    0x00, "A 1/1 B 1/1" )
  1046. PORT_DIPSETTING(    0xc2, DEF_STR( Free_Play ) ) */
  1047.     PORT_DIPNAME( 0xc2, 0x00, DEF_STR( Coinage ) )
  1048.     PORT_DIPSETTING(    0x42, "A 4/1 B 1/1" )
  1049.     PORT_DIPSETTING(    0x82, "A 3/1 B 1/1" )
  1050.     PORT_DIPSETTING(    0x02, "A 2/1 B 1/1" )
  1051.     PORT_DIPSETTING(    0xc0, "A 2/1 B 2/1" )
  1052.     PORT_DIPSETTING(    0x80, "A 2/1 B 1/2" )
  1053.     PORT_DIPSETTING(    0x40, "A 2/1 B 1/3" )
  1054.     PORT_DIPSETTING(    0x00, "A 1/1 B 1/1" )
  1055.     PORT_DIPSETTING(    0xc2, DEF_STR( Free_Play ) )
  1056.  
  1057.     PORT_START      /* IN0 */
  1058.     PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
  1059.     PORT_BITX(0x02, IP_ACTIVE_HIGH, IPT_SERVICE, "Select in Service Mode", KEYCODE_F1, IP_JOY_NONE )
  1060.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
  1061.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
  1062.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1063.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1064.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1065.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1066.  
  1067.     PORT_START    /* trackball H not used */
  1068.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  1069.  
  1070.     PORT_START    /* trackball V not used */
  1071.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  1072.  
  1073.     PORT_START      /* IN3 */
  1074.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1075.     PORT_BITX(0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER1, "Swing", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  1076.     PORT_BITX(0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2, "Pitch Left", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  1077.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1078.     PORT_BITX(0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER2, "Pitch Right", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  1079.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1080.     PORT_BITX(0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER1, "Bunt", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  1081.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1082. INPUT_PORTS_END
  1083.  
  1084. INPUT_PORTS_START( screwloo )
  1085.     PORT_START      /* DSW0 */
  1086.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
  1087.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  1088.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1089.     PORT_DIPNAME( 0x02, 0x00, "Demo mode" )
  1090.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1091.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  1092.     PORT_DIPNAME( 0x04, 0x00, "1st Bonus Atom at" )
  1093.     PORT_DIPSETTING(    0x00, "5000" )
  1094.     PORT_DIPSETTING(    0x04, "20000" )
  1095.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Free_Play ) )
  1096.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1097.     PORT_DIPSETTING(    0x08, DEF_STR( On ) )
  1098.     PORT_DIPNAME( 0x50, 0x40, DEF_STR( Coinage ) )
  1099.     PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
  1100.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_2C ) )
  1101.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_1C ) )
  1102.     PORT_DIPSETTING(    0x50, DEF_STR( 1C_2C ) )
  1103.     PORT_DIPNAME( 0x20, 0x00, "1st Bonus Hand at" )
  1104.     PORT_DIPSETTING(    0x00, "25000" )
  1105.     PORT_DIPSETTING(    0x20, "50000" )
  1106.     PORT_DIPNAME( 0x80, 0x00, "Hands" )
  1107.     PORT_DIPSETTING(    0x00, "3" )
  1108.     PORT_DIPSETTING(    0x80, "5" )
  1109.  
  1110.     PORT_START      /* IN0 */
  1111.     PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
  1112.     PORT_BITX(0x02, IP_ACTIVE_HIGH, IPT_SERVICE, "Select in Service Mode", KEYCODE_F1, IP_JOY_NONE )
  1113.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
  1114.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
  1115.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT | IPF_8WAY )
  1116.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT  | IPF_8WAY )
  1117.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN  | IPF_8WAY )
  1118.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP    | IPF_8WAY )
  1119.  
  1120.     PORT_START    /* trackball H not used */
  1121.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  1122.  
  1123.     PORT_START    /* trackball V not used */
  1124.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  1125.  
  1126.     PORT_START      /* IN3 */
  1127.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT | IPF_8WAY )
  1128.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT  | IPF_8WAY )
  1129.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN  | IPF_8WAY )
  1130.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP    | IPF_8WAY )
  1131.     PORT_BITX(0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER1, "Start 2P", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  1132.     PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER1, "Start 1P", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  1133.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1134.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1135. INPUT_PORTS_END
  1136.  
  1137. INPUT_PORTS_START( insector )
  1138.     PORT_START      /* DSW0 */
  1139.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Bonus_Life ) )
  1140.     PORT_DIPSETTING(    0x00, "25000" )
  1141.     PORT_DIPSETTING(    0x01, "30000" )
  1142.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  1143.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1144.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1145.     PORT_DIPNAME( 0x04, 0x00, "Demo mode" )
  1146.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1147.     PORT_DIPSETTING(    0x04, DEF_STR( On ) )
  1148.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) )
  1149.     PORT_DIPSETTING(    0x08, "3" )
  1150.     PORT_DIPSETTING(    0x00, "5" )
  1151.     PORT_DIPNAME( 0x50, 0x00, DEF_STR( Coinage ) )
  1152.     PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) )
  1153.     PORT_DIPSETTING(    0x50, DEF_STR( 2C_2C ) )
  1154.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  1155.     PORT_DIPSETTING(    0x10, DEF_STR( 1C_2C ) )
  1156.     PORT_DIPNAME( 0x20, 0x00, DEF_STR( Free_Play ) )
  1157.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1158.     PORT_DIPSETTING(    0x20, DEF_STR( On ) )
  1159.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
  1160.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  1161.     PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
  1162.  
  1163.     PORT_START      /* IN0 */
  1164.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  1165.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  1166.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
  1167.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
  1168.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL )
  1169.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_COCKTAIL )
  1170.     PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
  1171.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1172.  
  1173.     PORT_START    /* trackball H not used */
  1174.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  1175.  
  1176.     PORT_START    /* trackball V not used */
  1177.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  1178.  
  1179.     PORT_START      /* IN3 */
  1180.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY )
  1181.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  1182.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  1183.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  1184.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  1185.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  1186.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  1187.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  1188. INPUT_PORTS_END
  1189.  
  1190.  
  1191.  
  1192. /* the games can store char gfx data in either a 4k RAM area (128 chars), or */
  1193. /* a 8k ROM area (256 chars). */
  1194. static struct GfxLayout charRAMlayout =
  1195. {
  1196.     8,8,    /* 8*8 characters */
  1197.     128,    /* 128 characters */
  1198.     4,      /* 4 bits per pixel */
  1199.     { 0, 1, 2, 3 },
  1200.     { 0, 4, 8, 12, 16, 20, 24, 28},
  1201.     { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
  1202.     32*8    /* every char takes 32 consecutive bytes */
  1203. };
  1204.  
  1205. static struct GfxLayout charROMlayout =
  1206. {
  1207.     8,8,    /* 8*8 characters */
  1208.     256,    /* 256 characters */
  1209.     4,      /* 4 bits per pixel */
  1210.     { 0, 1, 2, 3 },
  1211.     { 0, 4, 8, 12, 16, 20, 24, 28},
  1212.     { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
  1213.     32*8    /* every char takes 32 consecutive bytes */
  1214. };
  1215.  
  1216. static struct GfxLayout spritelayout =
  1217. {
  1218.     16,16,  /* 16*16 sprites */
  1219.     256,    /* 256 sprites */
  1220.     4,      /* 4 bits per pixel */
  1221.     { 0, 256*32*8, 2*256*32*8, 3*256*32*8 },
  1222.     { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
  1223.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
  1224.             8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
  1225.     32*8    /* every sprite takes 32 consecutive bytes */
  1226. };
  1227.  
  1228. static struct GfxLayout qbertqub_spritelayout =
  1229. {
  1230.     16,16,  /* 16*16 sprites */
  1231.     512,    /* 512 sprites */
  1232.     4,      /* 4 bits per pixel */
  1233.     { 0, 512*32*8, 2*512*32*8, 3*512*32*8 },
  1234.     { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
  1235.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
  1236.             8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
  1237.     32*8    /* every sprite takes 32 consecutive bytes */
  1238. };
  1239.  
  1240. static struct GfxDecodeInfo charRAM_gfxdecodeinfo[] =
  1241. {
  1242.     { 0,           0x4000, &charRAMlayout, 0, 1 },    /* the game dynamically modifies this */
  1243.     { REGION_GFX2, 0x0000, &spritelayout,  0, 1 },
  1244.     { -1 } /* end of array */
  1245. };
  1246.  
  1247. static struct GfxDecodeInfo charROM_gfxdecodeinfo[] =
  1248. {
  1249.     { REGION_GFX1, 0x0000, &charROMlayout, 0, 1 },
  1250.     { REGION_GFX2, 0x0000, &spritelayout,  0, 1 },
  1251.     { -1 } /* end of array */
  1252. };
  1253.  
  1254. static struct GfxDecodeInfo qbertqub_gfxdecodeinfo[] =
  1255. {
  1256.     { REGION_GFX1, 0x0000, &charROMlayout,         0, 1 },
  1257.     { REGION_GFX2, 0x0000, &qbertqub_spritelayout, 0, 1 },
  1258.     { -1 } /* end of array */
  1259. };
  1260.  
  1261.  
  1262.  
  1263. static struct DACinterface dac1_interface =
  1264. {
  1265.     1,
  1266.     { 50 }
  1267. };
  1268.  
  1269. static struct DACinterface dac2_interface =
  1270. {
  1271.     2,
  1272.     { 25, 25 }
  1273. };
  1274.  
  1275. static const char *reactor_sample_names[] =
  1276. {
  1277.     "*reactor",
  1278.     "fx_53.wav", /* "8 left" */
  1279.     "fx_54.wav", /* "16 left" */
  1280.     "fx_55.wav", /* "24 left" */
  1281.     "fx_56.wav", /* "32 left" */
  1282.     "fx_57.wav", /* "40 left" */
  1283.     "fx_58.wav", /* "warning, core unstable" */
  1284.     "fx_59.wav", /* "bonus" */
  1285.     "fx_31.wav", /* "chamber activated" */
  1286.     "fx_39a.wav", /* "2000" */
  1287.     "fx_39b.wav", /* "5000" */
  1288.     "fx_39c.wav", /* "10000" */
  1289.     "fx_39d.wav", /* "15000" */
  1290.     "fx_39e.wav", /* "20000" */
  1291.     "fx_39f.wav", /* "25000" */
  1292.     "fx_39g.wav", /* "30000" */
  1293.     "fx_39h.wav", /* "35000" */
  1294.     "fx_39i.wav", /* "40000" */
  1295.     "fx_39j.wav", /* "45000" */
  1296.     "fx_39k.wav", /* "50000" */
  1297.     "fx_39l.wav", /* "55000" */
  1298.      0    /* end of array */
  1299. };
  1300.  
  1301. static const char *qbert_sample_names[] =
  1302. {
  1303.     "*qbert",
  1304.     "fx_17a.wav", /* random speech, voice clock 255 */
  1305.     "fx_17b.wav", /* random speech, voice clock 255 */
  1306.     "fx_17c.wav", /* random speech, voice clock 255 */
  1307.     "fx_17d.wav", /* random speech, voice clock 255 */
  1308.     "fx_17e.wav", /* random speech, voice clock 255 */
  1309.     "fx_17f.wav", /* random speech, voice clock 255 */
  1310.     "fx_17g.wav", /* random speech, voice clock 255 */
  1311.     "fx_17h.wav", /* random speech, voice clock 255 */
  1312.     "fx_18a.wav", /* random speech, voice clock 176 */
  1313.     "fx_18b.wav", /* random speech, voice clock 176 */
  1314.     "fx_18c.wav", /* random speech, voice clock 176 */
  1315.     "fx_18d.wav", /* random speech, voice clock 176 */
  1316.     "fx_18e.wav", /* random speech, voice clock 176 */
  1317.     "fx_18f.wav", /* random speech, voice clock 176 */
  1318.     "fx_18g.wav", /* random speech, voice clock 176 */
  1319.     "fx_18h.wav", /* random speech, voice clock 176 */
  1320.     "fx_19a.wav", /* random speech, voice clock 128 */
  1321.     "fx_19b.wav", /* random speech, voice clock 128 */
  1322.     "fx_19c.wav", /* random speech, voice clock 128 */
  1323.     "fx_19d.wav", /* random speech, voice clock 128 */
  1324.     "fx_19e.wav", /* random speech, voice clock 128 */
  1325.     "fx_19f.wav", /* random speech, voice clock 128 */
  1326.     "fx_19g.wav", /* random speech, voice clock 128 */
  1327.     "fx_19h.wav", /* random speech, voice clock 128 */
  1328.     "fx_20a.wav", /* random speech, voice clock 96 */
  1329.     "fx_20b.wav", /* random speech, voice clock 96 */
  1330.     "fx_20c.wav", /* random speech, voice clock 96 */
  1331.     "fx_20d.wav", /* random speech, voice clock 96 */
  1332.     "fx_20e.wav", /* random speech, voice clock 96 */
  1333.     "fx_20f.wav", /* random speech, voice clock 96 */
  1334.     "fx_20g.wav", /* random speech, voice clock 96 */
  1335.     "fx_20h.wav", /* random speech, voice clock 96 */
  1336.     "fx_21a.wav", /* random speech, voice clock 62 */
  1337.     "fx_21b.wav", /* random speech, voice clock 62 */
  1338.     "fx_21c.wav", /* random speech, voice clock 62 */
  1339.     "fx_21d.wav", /* random speech, voice clock 62 */
  1340.     "fx_21e.wav", /* random speech, voice clock 62 */
  1341.     "fx_21f.wav", /* random speech, voice clock 62 */
  1342.     "fx_21g.wav", /* random speech, voice clock 62 */
  1343.     "fx_21h.wav", /* random speech, voice clock 62 */
  1344.     "fx_22.wav", /* EH2 with decreasing voice clock */
  1345.     "fx_23.wav", /* O1 with varying voice clock */
  1346.     "fx_28.wav", /* "hello, I'm ready" */
  1347.     "fx_36.wav", /* "byebye" */
  1348.     "knocker.wav",
  1349.     0    /* end of array */
  1350. };
  1351.  
  1352. static struct Samplesinterface samples_interface =
  1353. {
  1354.     1,    /* one channel */
  1355.     100    /* volume */
  1356. };
  1357.  
  1358. static struct AY8910interface ay8910_interface =
  1359. {
  1360.     2,    /* 2 chips */
  1361.     2000000,    /* 2 MHz */
  1362.     { 25, 25 },
  1363.     { 0 },
  1364.     { 0 },
  1365.     { 0 },
  1366.     { 0 }
  1367. };
  1368.  
  1369.  
  1370.  
  1371. /********************************************************************
  1372. *
  1373. *  Machine Driver macro
  1374. *  ====================
  1375. *
  1376. *  There are two versions of the machine driver,
  1377. *  one for revision 1 sound board (1x6502 + DAC + Votrax),
  1378. *  one for revision 2 (2x6502 + DAC + GI SP-0250 speech chip + 2x8910).
  1379. *  They are identical apart form the sound CPU subsections.
  1380. *
  1381. ********************************************************************/
  1382.  
  1383. #define MACHINE_DRIVER_SOUND_1(GAMENAME,READMEM,WRITEMEM,GFX,NVRAM)    \
  1384. static struct MachineDriver machine_driver_##GAMENAME =             \
  1385. {                                                                   \
  1386.     /* basic machine hardware */                                    \
  1387.     {                                                                \
  1388.         {                                                              \
  1389.             CPU_I86,                                                \
  1390.             5000000,        /* 5 Mhz */                                \
  1391.             READMEM,WRITEMEM,0,0,                                    \
  1392.             gottlieb_interrupt,1                                    \
  1393.         },                                                            \
  1394.         {                                                            \
  1395.             CPU_M6502 | CPU_AUDIO_CPU ,                                \
  1396.             3579545/4,    /* the board can be set to /2 as well */    \
  1397.             gottlieb_sound_readmem,gottlieb_sound_writemem,0,0,        \
  1398.             ignore_interrupt,1    /* IRQs are triggered by the main CPU */        \
  1399.                                 /* NMIs are triggered by the Votrax SC-01 */    \
  1400.         }                                                           \
  1401.     },                                                              \
  1402.     61, 1018,    /* frames per second, vblank duration */            \
  1403.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ \
  1404.     init_machine,                                                    \
  1405.                                                                     \
  1406.     /* video hardware */                                            \
  1407.     32*8, 32*8, { 0*8, 32*8-1, 0*8, 30*8-1 },                        \
  1408.     GFX,                                                            \
  1409.     16, 16,                                                            \
  1410.     0,                                                                   \
  1411.                                                                     \
  1412.     VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY|VIDEO_MODIFIES_PALETTE,    \
  1413.     0,                                                              \
  1414.     gottlieb_vh_start,                                                \
  1415.     gottlieb_vh_stop,                                                \
  1416.     gottlieb_vh_screenrefresh,                                        \
  1417.                                                                     \
  1418.     /* sound hardware */                                            \
  1419.     0,0,0,0,                                                        \
  1420.     {                                                               \
  1421.         {                                                           \
  1422.             SOUND_DAC,                                                \
  1423.             &dac1_interface                                            \
  1424.         },                                                            \
  1425.         {                                                            \
  1426.             SOUND_SAMPLES,    /* for Votrax simulation */                \
  1427.             &samples_interface                                        \
  1428.         }                                                           \
  1429.     },                                                               \
  1430.                                                                     \
  1431.     NVRAM                                                            \
  1432. }
  1433.  
  1434. #define MACHINE_DRIVER_SOUND_2(GAMENAME,READMEM,WRITEMEM,GFX,NVRAM)    \
  1435. static struct MachineDriver machine_driver_##GAMENAME =                \
  1436. {                                                                    \
  1437.     /* basic machine hardware */                                    \
  1438.     {                                                                \
  1439.         {                                                            \
  1440.             CPU_I86,                                                \
  1441.             5000000,        /* 5 Mhz */                                \
  1442.             READMEM,WRITEMEM,0,0,                                    \
  1443.             gottlieb_interrupt,1                                    \
  1444.         },                                                            \
  1445.         {                                                            \
  1446.             CPU_M6502 | CPU_AUDIO_CPU ,                                \
  1447.             1000000,    /* 1 MHz */                                    \
  1448.             stooges_sound_readmem,stooges_sound_writemem,0,0,        \
  1449.             ignore_interrupt,1    /* IRQs are triggered by the main CPU */            \
  1450.                                 /* NMIs are triggered by the second sound CPU */    \
  1451.         },                                                            \
  1452.         {                                                            \
  1453.             CPU_M6502 | CPU_AUDIO_CPU ,                                \
  1454.             1000000,    /* 1 MHz */                                    \
  1455.             stooges_sound2_readmem,stooges_sound2_writemem,0,0,        \
  1456.             ignore_interrupt,1    /* IRQs are triggered by the main CPU */            \
  1457.                                 /* NMIs are triggered by a programmable timer */    \
  1458.         }                                                            \
  1459.     },                                                                \
  1460.     61, 1018,    /* frames per second, vblank duration */            \
  1461.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ \
  1462.     init_machine,                                                    \
  1463.                                                                     \
  1464.     /* video hardware */                                            \
  1465.     32*8, 32*8, { 0*8, 32*8-1, 0*8, 30*8-1 },                        \
  1466.     GFX,                                                            \
  1467.     16, 16,                                                            \
  1468.     0,                                                                \
  1469.                                                                     \
  1470.     VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY|VIDEO_MODIFIES_PALETTE,    \
  1471.     0,                                                                \
  1472.     gottlieb_vh_start,                                                \
  1473.     gottlieb_vh_stop,                                                \
  1474.     gottlieb_vh_screenrefresh,                                        \
  1475.                                                                     \
  1476.     /* sound hardware */                                            \
  1477.     0,0,0,0,                                                        \
  1478.     {                                                                \
  1479.         {                                                            \
  1480.             SOUND_DAC,                                                \
  1481.             &dac2_interface                                            \
  1482.         },                                                            \
  1483.         {                                                            \
  1484.             SOUND_AY8910,                                            \
  1485.             &ay8910_interface                                        \
  1486.         }                                                            \
  1487.     },                                                                \
  1488.                                                                     \
  1489.     NVRAM                                                            \
  1490. }
  1491.  
  1492. /* games using the revision 1 sound board */
  1493. MACHINE_DRIVER_SOUND_1(reactor,  reactor_readmem, reactor_writemem, charRAM_gfxdecodeinfo, 0);
  1494. MACHINE_DRIVER_SOUND_1(gottlieb, gottlieb_readmem,gottlieb_writemem,charROM_gfxdecodeinfo, nvram_handler);
  1495. MACHINE_DRIVER_SOUND_1(qbertqub, gottlieb_readmem,gottlieb_writemem,qbertqub_gfxdecodeinfo,nvram_handler);
  1496. MACHINE_DRIVER_SOUND_1(krull,    gottlieb_readmem,gottlieb_writemem,charRAM_gfxdecodeinfo, nvram_handler);
  1497. /* games using the revision 2 sound board */
  1498. MACHINE_DRIVER_SOUND_2(mach3,    gottlieb_readmem,usvsthem_writemem,charROM_gfxdecodeinfo, nvram_handler);
  1499. MACHINE_DRIVER_SOUND_2(usvsthem, gottlieb_readmem,usvsthem_writemem,qbertqub_gfxdecodeinfo,nvram_handler);
  1500. MACHINE_DRIVER_SOUND_2(stooges,  stooges_readmem, stooges_writemem, charRAM_gfxdecodeinfo, nvram_handler);
  1501. MACHINE_DRIVER_SOUND_2(gottlieb2,gottlieb_readmem,gottlieb_writemem,charROM_gfxdecodeinfo, nvram_handler);
  1502.  
  1503.  
  1504. /***************************************************************************
  1505.  
  1506.   Game driver(s)
  1507.  
  1508. ***************************************************************************/
  1509.  
  1510. ROM_START( reactor )
  1511.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  1512.     ROM_LOAD( "rom7",         0x8000, 0x1000, 0xa62d86fd )
  1513.     ROM_LOAD( "rom6",         0x9000, 0x1000, 0x6ed841f3 )
  1514.     ROM_LOAD( "rom5",         0xa000, 0x1000, 0xd90576a3 )
  1515.     ROM_LOAD( "rom4",         0xb000, 0x1000, 0x0155daae )
  1516.     ROM_LOAD( "rom3",         0xc000, 0x1000, 0xf8881385 )
  1517.     ROM_LOAD( "rom2",         0xd000, 0x1000, 0x3caba35b )
  1518.     ROM_LOAD( "rom1",         0xe000, 0x1000, 0x944e1ddf )
  1519.     ROM_LOAD( "rom0",         0xf000, 0x1000, 0x55930aed )
  1520.  
  1521.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  1522.     ROM_LOAD( "snd1",         0xf000, 0x800, 0xd958a0fd )
  1523.     ROM_RELOAD(               0x7000, 0x800 ) /* A15 is not decoded */
  1524.     ROM_LOAD( "snd2",         0xf800, 0x800, 0x5dc86942 )
  1525.     ROM_RELOAD(               0x7800, 0x800 ) /* A15 is not decoded */
  1526.  
  1527.     /* no gfx1 (RAM is used) */
  1528.  
  1529.     ROM_REGION( 0x8000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1530.     /* 0000-0fff empty */
  1531.     ROM_LOAD( "fg3",          0x1000, 0x1000, 0x8416ad53 )    /* sprites */
  1532.     /* 2000-2fff empty */
  1533.     ROM_LOAD( "fg2",          0x3000, 0x1000, 0x5489605a )
  1534.     /* 4000-4fff empty */
  1535.     ROM_LOAD( "fg1",          0x5000, 0x1000, 0x18396c57 )
  1536.     /* 6000-6fff empty */
  1537.     ROM_LOAD( "fg0",          0x7000, 0x1000, 0xd1f20e15 )
  1538. ROM_END
  1539.  
  1540. ROM_START( mplanets )
  1541.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  1542.     ROM_LOAD( "rom4",         0x6000, 0x2000, 0x5402077f )
  1543.     ROM_LOAD( "rom3",         0x8000, 0x2000, 0x5d18d740 )
  1544.     ROM_LOAD( "rom2",         0xa000, 0x2000, 0x960c3bb1 )
  1545.     ROM_LOAD( "rom1",         0xc000, 0x2000, 0xeb515f10 )
  1546.     ROM_LOAD( "rom0",         0xe000, 0x2000, 0x74de78aa )
  1547.  
  1548.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  1549.     ROM_LOAD( "snd1",         0xf000, 0x800, 0x453193a1 )
  1550.     ROM_RELOAD(               0x7000, 0x800 ) /* A15 is not decoded */
  1551.     ROM_LOAD( "snd2",         0xf800, 0x800, 0xf5ffc98f )
  1552.     ROM_RELOAD(               0x7800, 0x800 ) /* A15 is not decoded */
  1553.  
  1554.     ROM_REGION( 0x2000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1555.     ROM_LOAD( "bg0",          0x0000, 0x1000, 0x709aa24c )    /* chars */
  1556.     ROM_LOAD( "bg1",          0x1000, 0x1000, 0x4921e345 )
  1557.  
  1558.     ROM_REGION( 0x8000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1559.     ROM_LOAD( "fg3",          0x0000, 0x2000, 0xc990b39f )    /* sprites */
  1560.     ROM_LOAD( "fg2",          0x2000, 0x2000, 0x735e2522 )
  1561.     ROM_LOAD( "fg1",          0x4000, 0x2000, 0x6456cc1c )
  1562.     ROM_LOAD( "fg0",          0x6000, 0x2000, 0xa920e325 )
  1563. ROM_END
  1564.  
  1565. ROM_START( qbert )
  1566.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  1567.     ROM_LOAD( "qb-rom2.bin",  0xa000, 0x2000, 0xfe434526 )
  1568.     ROM_LOAD( "qb-rom1.bin",  0xc000, 0x2000, 0x55635447 )
  1569.     ROM_LOAD( "qb-rom0.bin",  0xe000, 0x2000, 0x8e318641 )
  1570.  
  1571.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  1572.     ROM_LOAD( "qb-snd1.bin",  0xf000, 0x800, 0x15787c07 )
  1573.     ROM_RELOAD(               0x7000, 0x800 ) /* A15 is not decoded */
  1574.     ROM_LOAD( "qb-snd2.bin",  0xf800, 0x800, 0x58437508 )
  1575.     ROM_RELOAD(               0x7800, 0x800 ) /* A15 is not decoded */
  1576.  
  1577.     ROM_REGION( 0x2000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1578.     ROM_LOAD( "qb-bg0.bin",   0x0000, 0x1000, 0x7a9ba824 )    /* chars */
  1579.     ROM_LOAD( "qb-bg1.bin",   0x1000, 0x1000, 0x22e5b891 )
  1580.  
  1581.     ROM_REGION( 0x8000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1582.     ROM_LOAD( "qb-fg3.bin",   0x0000, 0x2000, 0xdd436d3a )    /* sprites */
  1583.     ROM_LOAD( "qb-fg2.bin",   0x2000, 0x2000, 0xf69b9483 )
  1584.     ROM_LOAD( "qb-fg1.bin",   0x4000, 0x2000, 0x224e8356 )
  1585.     ROM_LOAD( "qb-fg0.bin",   0x6000, 0x2000, 0x2f695b85 )
  1586. ROM_END
  1587.  
  1588. ROM_START( qbertjp )
  1589.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  1590.     ROM_LOAD( "qbj-rom2.bin", 0xa000, 0x2000, 0x67bb1cb2 )
  1591.     ROM_LOAD( "qbj-rom1.bin", 0xc000, 0x2000, 0xc61216e7 )
  1592.     ROM_LOAD( "qbj-rom0.bin", 0xe000, 0x2000, 0x69679d5c )
  1593.  
  1594.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  1595.     ROM_LOAD( "qb-snd1.bin",  0xf000, 0x800, 0x15787c07 )
  1596.     ROM_RELOAD(               0x7000, 0x800 ) /* A15 is not decoded */
  1597.     ROM_LOAD( "qb-snd2.bin",  0xf800, 0x800, 0x58437508 )
  1598.     ROM_RELOAD(               0x7800, 0x800 ) /* A15 is not decoded */
  1599.  
  1600.     ROM_REGION( 0x2000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1601.     ROM_LOAD( "qb-bg0.bin",   0x0000, 0x1000, 0x7a9ba824 )    /* chars */
  1602.     ROM_LOAD( "qb-bg1.bin",   0x1000, 0x1000, 0x22e5b891 )
  1603.  
  1604.     ROM_REGION( 0x8000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1605.     ROM_LOAD( "qb-fg3.bin",   0x0000, 0x2000, 0xdd436d3a )    /* sprites */
  1606.     ROM_LOAD( "qb-fg2.bin",   0x2000, 0x2000, 0xf69b9483 )
  1607.     ROM_LOAD( "qb-fg1.bin",   0x4000, 0x2000, 0x224e8356 )
  1608.     ROM_LOAD( "qb-fg0.bin",   0x6000, 0x2000, 0x2f695b85 )
  1609. ROM_END
  1610.  
  1611. ROM_START( insector )
  1612.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  1613.     ROM_LOAD( "rom3",         0x8000, 0x2000, 0x640881fd )
  1614.     ROM_LOAD( "rom2",         0xa000, 0x2000, 0x456bc3f4 )
  1615.     ROM_LOAD( "rom1",         0xc000, 0x2000, 0x706962af )
  1616.     ROM_LOAD( "rom0",         0xe000, 0x2000, 0x31cee24b )
  1617.  
  1618.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  1619.     ROM_LOAD( "sound",        0xf000, 0x1000, 0x00000000 )
  1620.  
  1621.     ROM_REGION( 0x2000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1622.     ROM_LOAD( "bg0",          0x0000, 0x1000, 0x0dc2037e )    /* chars */
  1623.     ROM_LOAD( "bg1",          0x1000, 0x1000, 0x3dd73b94 )
  1624.  
  1625.     ROM_REGION( 0x8000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1626.     ROM_LOAD( "fg3",          0x0000, 0x2000, 0x9bbf5b6b )    /* sprites */
  1627.     ROM_LOAD( "fg2",          0x2000, 0x2000, 0x5adf9986 )
  1628.     ROM_LOAD( "fg1",          0x4000, 0x2000, 0x4bb16111 )
  1629.     ROM_LOAD( "fg0",          0x6000, 0x2000, 0x965f6b76 )
  1630. ROM_END
  1631.  
  1632. ROM_START( screwloo )
  1633.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  1634.     ROM_LOAD( "rom4",         0x6000, 0x2000, 0x744a2513 )
  1635.     ROM_LOAD( "rom3",         0x8000, 0x2000, 0xffde5b5d )
  1636.     ROM_LOAD( "rom2",         0xa000, 0x2000, 0x97932b05 )
  1637.     ROM_LOAD( "rom1",         0xc000, 0x2000, 0x571b65ca )
  1638.     ROM_LOAD( "rom0",         0xe000, 0x2000, 0x6447fe54 )
  1639.  
  1640.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  1641.     ROM_LOAD( "drom1",        0xe000, 0x2000, 0xae965ade )
  1642.  
  1643.     ROM_REGION( 0x10000, REGION_CPU3 )    /* 64k for second sound cpu */
  1644.     ROM_LOAD( "yrom1",        0xe000, 0x2000, 0x3719b0b5 )
  1645.  
  1646.     ROM_REGION( 0x2000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1647.     ROM_LOAD( "bg0",          0x0000, 0x1000, 0x1fd5b649 )    /* chars */
  1648.     ROM_LOAD( "bg1",          0x1000, 0x1000, 0xc8ddb8ba )
  1649.  
  1650.     ROM_REGION( 0x8000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1651.     ROM_LOAD( "fg3",          0x0000, 0x2000, 0x97d4e63b )    /* sprites */
  1652.     ROM_LOAD( "fg2",          0x2000, 0x2000, 0xf76e56ca )
  1653.     ROM_LOAD( "fg1",          0x4000, 0x2000, 0x698c395f )
  1654.     ROM_LOAD( "fg0",          0x6000, 0x2000, 0xf23269fb )
  1655. ROM_END
  1656.  
  1657. ROM_START( sqbert )
  1658.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  1659.     ROM_LOAD( "qb-rom2.bin",  0xa000, 0x2000, 0x1e3d4038 )
  1660.     ROM_LOAD( "qb-rom1.bin",  0xc000, 0x2000, 0xeaf3076c )
  1661.     ROM_LOAD( "qb-rom0.bin",  0xe000, 0x2000, 0x61260a7e )
  1662.  
  1663.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  1664.     ROM_LOAD( "qb-snd1.bin",  0xf000, 0x800, 0x15787c07 )
  1665.     ROM_RELOAD(               0x7000, 0x800 ) /* A15 is not decoded */
  1666.     ROM_LOAD( "qb-snd2.bin",  0xf800, 0x800, 0x58437508 )
  1667.     ROM_RELOAD(               0x7800, 0x800 ) /* A15 is not decoded */
  1668.  
  1669.     ROM_REGION( 0x2000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1670.     ROM_LOAD( "qb-bg0.bin",   0x0000, 0x1000, 0xc3118eef )    /* chars */
  1671.     ROM_LOAD( "qb-bg1.bin",   0x1000, 0x1000, 0x4f6d8075 )
  1672.  
  1673.     ROM_REGION( 0x8000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1674.     ROM_LOAD( "qb-fg3.bin",   0x0000, 0x2000, 0xee595eda )    /* sprites */
  1675.     ROM_LOAD( "qb-fg2.bin",   0x2000, 0x2000, 0x59884c78 )
  1676.     ROM_LOAD( "qb-fg1.bin",   0x4000, 0x2000, 0x2a60e3ad )
  1677.     ROM_LOAD( "qb-fg0.bin",   0x6000, 0x2000, 0xb11ad9d8 )
  1678. ROM_END
  1679.  
  1680. ROM_START( qbertqub )
  1681.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  1682.     ROM_LOAD( "qq-rom3.bin",  0x8000, 0x2000, 0xc4dbdcd7 )
  1683.     ROM_LOAD( "qq-rom2.bin",  0xa000, 0x2000, 0x21a6c6cc )
  1684.     ROM_LOAD( "qq-rom1.bin",  0xc000, 0x2000, 0x63e6c43d )
  1685.     ROM_LOAD( "qq-rom0.bin",  0xe000, 0x2000, 0x8ddbe438 )
  1686.  
  1687.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  1688.     ROM_LOAD( "qb-snd1.bin",  0xf000, 0x800, 0x15787c07 )
  1689.     ROM_RELOAD(               0x7000, 0x800 ) /* A15 is not decoded */
  1690.     ROM_LOAD( "qb-snd2.bin",  0xf800, 0x800, 0x58437508 )
  1691.     ROM_RELOAD(               0x7800, 0x800 ) /* A15 is not decoded */
  1692.  
  1693.     ROM_REGION( 0x2000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1694.     ROM_LOAD( "qq-bg0.bin",   0x0000, 0x1000, 0x050badde )    /* chars */
  1695.     ROM_LOAD( "qq-bg1.bin",   0x1000, 0x1000, 0x8875902f )
  1696.  
  1697.     ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1698.     ROM_LOAD( "qq-fg3.bin",   0x0000, 0x4000, 0x91a949cc )    /* sprites */
  1699.     ROM_LOAD( "qq-fg2.bin",   0x4000, 0x4000, 0x782d9431 )
  1700.     ROM_LOAD( "qq-fg1.bin",   0x8000, 0x4000, 0x71c3ac4c )
  1701.     ROM_LOAD( "qq-fg0.bin",   0xc000, 0x4000, 0x6192853f )
  1702. ROM_END
  1703.  
  1704. ROM_START( krull )
  1705.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  1706.     ROM_LOAD( "ram2.bin",     0x1000, 0x1000, 0x302feadf )
  1707.     ROM_LOAD( "ram4.bin",     0x2000, 0x1000, 0x79355a60 )
  1708.     ROM_LOAD( "rom4.bin",     0x6000, 0x2000, 0x2b696394 )
  1709.     ROM_LOAD( "rom3.bin",     0x8000, 0x2000, 0x14b0ee42 )
  1710.     ROM_LOAD( "rom2.bin",     0xa000, 0x2000, 0xb5fad94a )
  1711.     ROM_LOAD( "rom1.bin",     0xc000, 0x2000, 0x1ad956a3 )
  1712.     ROM_LOAD( "rom0.bin",     0xe000, 0x2000, 0xa466afae )
  1713.  
  1714.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  1715.     ROM_LOAD( "snd1.bin",     0xe000, 0x1000, 0xdd2b30b4 )
  1716.     ROM_RELOAD(               0x6000, 0x1000 ) /* A15 is not decoded */
  1717.     ROM_LOAD( "snd2.bin",     0xf000, 0x1000, 0x8cab901b )
  1718.     ROM_RELOAD(               0x7000, 0x1000 ) /* A15 is not decoded */
  1719.  
  1720.     /* no gfx1 (RAM is used) */
  1721.  
  1722.     ROM_REGION( 0x8000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1723.     ROM_LOAD( "fg3.bin",      0x0000, 0x2000, 0x82d77a45 )    /* sprites */
  1724.     ROM_LOAD( "fg2.bin",      0x2000, 0x2000, 0x25a24317 )
  1725.     ROM_LOAD( "fg1.bin",      0x4000, 0x2000, 0x7e3ad7b0 )
  1726.     ROM_LOAD( "fg0.bin",      0x6000, 0x2000, 0x7402dc19 )
  1727. ROM_END
  1728.  
  1729. ROM_START( mach3 )
  1730.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1731.     ROM_LOAD( "m3rom4.bin",   0x6000, 0x2000, 0x8bfd5a44 )
  1732.     ROM_LOAD( "m3rom3.bin",   0x8000, 0x2000, 0xb1b045af )
  1733.     ROM_LOAD( "m3rom2.bin",   0xa000, 0x2000, 0xfbdfb03d )
  1734.     ROM_LOAD( "m3rom1.bin",   0xc000, 0x2000, 0x3b0ba80b )
  1735.     ROM_LOAD( "m3rom0.bin",   0xe000, 0x2000, 0x70c12bf4 )
  1736.  
  1737.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  1738.     ROM_LOAD( "m3drom1.bin",  0xf000, 0x1000, 0xa6e29212 )
  1739.  
  1740.     ROM_REGION( 0x10000, REGION_CPU3 )    /* 64k for second sound cpu */
  1741.     ROM_LOAD( "m3yrom1.bin",  0xf000, 0x1000, 0xeddf8872 )
  1742.  
  1743.     ROM_REGION( 0x2000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1744.     ROM_LOAD( "mach3bg0.bin", 0x0000, 0x1000, 0xea2f5257 )
  1745.     ROM_LOAD( "mach3bg1.bin", 0x1000, 0x1000, 0xf543e4ce )
  1746.  
  1747.     ROM_REGION( 0x8000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1748.     ROM_LOAD( "mach3fg3.bin", 0x0000, 0x2000, 0x472128b4 )
  1749.     ROM_LOAD( "mach3fg2.bin", 0x2000, 0x2000, 0x2a59e99e )
  1750.     ROM_LOAD( "mach3fg1.bin", 0x4000, 0x2000, 0x9b88767b )
  1751.     ROM_LOAD( "mach3fg0.bin", 0x6000, 0x2000, 0x0bae12a5 )
  1752. ROM_END
  1753.  
  1754. ROM_START( usvsthem )
  1755.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1756.     ROM_LOAD( "usvs.rm4",     0x6000, 0x2000, 0x0d7a4072 )
  1757.     ROM_LOAD( "usvs.rm3",     0x8000, 0x2000, 0x6f32a671 )
  1758.     ROM_LOAD( "usvs.rm2",     0xa000, 0x2000, 0x36770716 )
  1759.     ROM_LOAD( "usvs.rm1",     0xc000, 0x2000, 0x697bc989 )
  1760.     ROM_LOAD( "usvs.rm0",     0xe000, 0x2000, 0x30cf6bd9 )
  1761.  
  1762.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  1763.     ROM_LOAD( "usvsdrom.1",   0xe000, 0x2000, 0xc0b5cab0 )
  1764.  
  1765.     ROM_REGION( 0x10000, REGION_CPU3 )    /* 64k for second sound cpu */
  1766.     ROM_LOAD( "usvsyrom.1",   0xe000, 0x2000, 0xc3d245ca )
  1767.  
  1768.     ROM_REGION( 0x2000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1769.     ROM_LOAD( "usvs.bg0",     0x0000, 0x1000, 0x8a0de09f )
  1770.     ROM_LOAD( "usvs.bg1",     0x1000, 0x1000, 0x6fb64d3c )
  1771.  
  1772.     ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1773.     ROM_LOAD( "usvs.fg3",     0x0000, 0x4000, 0x98703015 )
  1774.     ROM_LOAD( "usvs.fg2",     0x4000, 0x4000, 0xd3990707 )
  1775.     ROM_LOAD( "usvs.fg1",     0x8000, 0x4000, 0xa2057430 )
  1776.     ROM_LOAD( "usvs.fg0",     0xc000, 0x4000, 0x7734e53f )
  1777. ROM_END
  1778.  
  1779. ROM_START( 3stooges )
  1780.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  1781.     ROM_LOAD( "gv113ram.4",   0x2000, 0x1000, 0x533bff2a )
  1782.     ROM_LOAD( "gv113rom.4",   0x6000, 0x2000, 0x8b6e52b8 )
  1783.     ROM_LOAD( "gv113rom.3",   0x8000, 0x2000, 0xb816d8c4 )
  1784.     ROM_LOAD( "gv113rom.2",   0xa000, 0x2000, 0xb45b2a79 )
  1785.     ROM_LOAD( "gv113rom.1",   0xc000, 0x2000, 0x34ab051e )
  1786.     ROM_LOAD( "gv113rom.0",   0xe000, 0x2000, 0xab124329 )
  1787.  
  1788.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  1789.     ROM_LOAD( "drom1",        0xe000, 0x2000, 0x87a9fa10 )
  1790.  
  1791.     ROM_REGION( 0x10000, REGION_CPU3 )    /* 64k for second sound cpu */
  1792.     ROM_LOAD( "yrom2",        0xc000, 0x2000, 0x90f9c940 )
  1793.     ROM_LOAD( "yrom1",        0xe000, 0x2000, 0x55f8ab30 )
  1794.  
  1795.     /* no gfx1 (RAM is used) */
  1796.  
  1797.     ROM_REGION( 0x8000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1798.     ROM_LOAD( "gv113fg3",     0x0000, 0x2000, 0x28071212 )    /* sprites */
  1799.     ROM_LOAD( "gv113fg2",     0x2000, 0x2000, 0x9fa3dfde )
  1800.     ROM_LOAD( "gv113fg1",     0x4000, 0x2000, 0xfb223854 )
  1801.     ROM_LOAD( "gv113fg0",     0x6000, 0x2000, 0x95762c53 )
  1802. ROM_END
  1803.  
  1804. ROM_START( curvebal )
  1805.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1806.     ROM_LOAD( "cb-rom-3.chp", 0x8000, 0x2000, 0x72ad4d45 )
  1807.     ROM_LOAD( "cb-rom-2.chp", 0xa000, 0x2000, 0xd46c3db5 )
  1808.     ROM_LOAD( "cb-rom-1.chp", 0xc000, 0x2000, 0xeb1e08bd )
  1809.     ROM_LOAD( "cb-rom-0.chp", 0xe000, 0x2000, 0x401fc7e3 )
  1810.  
  1811.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  1812.     ROM_LOAD( "yrom.sbd",     0xe000, 0x1000, 0x4c313d9b )
  1813.     ROM_LOAD( "drom.sbd",     0xf000, 0x1000, 0xcecece88 )
  1814.  
  1815.     ROM_REGION( 0x2000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1816.     ROM_LOAD( "cb-bg-0.chp",  0x0000, 0x1000, 0xd666a179 )
  1817.     ROM_LOAD( "cb-bg-1.chp",  0x1000, 0x1000, 0x5e34ff4e )
  1818.  
  1819.     ROM_REGION( 0x8000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1820.     ROM_LOAD( "cb-fg-3.chp",  0x0000, 0x2000, 0x9c9452fe )
  1821.     ROM_LOAD( "cb-fg-2.chp",  0x2000, 0x2000, 0x065131af )
  1822.     ROM_LOAD( "cb-fg-1.chp",  0x4000, 0x2000, 0x1b7b7f94 )
  1823.     ROM_LOAD( "cb-fg-0.chp",  0x6000, 0x2000, 0xe3a8230e )
  1824. ROM_END
  1825.  
  1826.  
  1827. static void init_reactor(void)
  1828. {
  1829.     samples_interface.samplenames = reactor_sample_names;
  1830. }
  1831.  
  1832. static void init_qbert(void)
  1833. {
  1834.     samples_interface.samplenames = qbert_sample_names;
  1835. }
  1836.  
  1837. static void init_gottlieb(void)
  1838. {
  1839.     gottlieb_sound_init();
  1840. }
  1841.  
  1842.  
  1843. GAME( 1982, reactor,  0,     reactor,  reactor,  reactor,  ROT0,   "Gottlieb", "Reactor" )
  1844. GAME( 1983, mplanets, 0,     gottlieb, mplanets, 0,        ROT270, "Gottlieb", "Mad Planets" )
  1845. GAME( 1982, qbert,    0,     gottlieb, qbert,    qbert,    ROT270, "Gottlieb", "Q*bert (US)" )
  1846. GAME( 1982, qbertjp,  qbert, gottlieb, qbert,    qbert,    ROT270, "Gottlieb (Konami license)", "Q*bert (Japan)" )
  1847. GAMEX(1982, insector, 0,     gottlieb, insector, 0,        ROT0,   "Gottlieb", "Insector (prototype)", GAME_NO_SOUND )
  1848. GAME( 1983, krull,    0,     krull,    krull,    0,        ROT270, "Gottlieb", "Krull" )
  1849. GAME( 1983, sqbert,   0,     gottlieb, qbert,    qbert,    ROT270, "Mylstar", "Faster, Harder, More Challenging Q*bert (prototype)" )
  1850. GAMEX(1983, mach3,    0,     mach3,    mach3,    gottlieb, ROT0,   "Mylstar", "M.A.C.H. 3", GAME_NOT_WORKING )
  1851. GAMEX(????, usvsthem, 0,     usvsthem, usvsthem, gottlieb, ROT0,   "Mylstar", "Us vs. Them", GAME_NOT_WORKING )
  1852. GAMEX(1984, 3stooges, 0,     stooges,  3stooges, gottlieb, ROT0,   "Mylstar", "Three Stooges", GAME_IMPERFECT_SOUND )
  1853. GAME( 1983, qbertqub, 0,     qbertqub, qbertqub, qbert,    ROT270, "Mylstar", "Q*bert's Qubes" )
  1854. GAME( 1983, screwloo, 0,     gottlieb2,screwloo, 0,        ROT0,   "Mylstar", "Screw Loose (prototype)" )
  1855. GAME( 1984, curvebal, 0,     gottlieb, curvebal, 0,        ROT270, "Mylstar", "Curve Ball" )
  1856.